Chapter 3 Raspberry Pi Installation

Purpose

This document describes how to set up a Raspberry Pi for the underlying demo devices described here:


Read those documents and come back to this section as necessary during the build process.


SD Card Setup

  1. Download Etcher and install it
  2. Download the latest Raspbian "Lite" image here
  3. Insert the SD card into your computer
  4. Run Etcher
  5. Select the Raspbian image .zip file
  6. Select the SD card as the target
  7. Wait for the image to be written to the SD card
  8. Physically remove the SD card from the computer and plug it into the Raspberry Pi

Pi Zero W Console Setup (Recommended)

  1. If you are setting up the Pi Zero W and don't have a micro HDMI adapter you can leave the SD card connected to your computer and edit /boot/config.txt to enable the serial console by putting the following lines at the end of the file:
# Enable serial console
enable_uart=1
  1. Unmount the SD card and install it in the Pi Zero.
  2. Use a USB FTDI cable (RX to RX, TX to TX) and something like minicom -D /dev/tty.usbserial-AH02M4JF to connect to the Pi Zero and you should see the boot-up sequence and eventually a login prompt


Initial Raspbian Setup

Connectivity and Console Access

  1. Connect the full-size Pi to a USB keyboard and HDMI monitor or use the USB FTDI cable with the Pi Zero W as described above
  2. Plug the Pi into power
  1. Log into the Pi for the first time using the username pi password raspberry

Raspi-Config

  1. Perform some basic system configuration

sudo raspi-config

Each time you will have to go back through the main menu again

If you are configuring the Pi Zero W the Change Keyboard Layout option will fail so just skip it.

  1. Select Finish and then Yes to reboot

Wi-Fi Setup

  1. Log in again as the pi account
  2. Edit the wpa-supplicant configuration file with the SSID and PSK you configured on the IR829. You can ignore the existing lines and put the network configuration after them.

sudo vi /etc/wpa_supplicant/wpa_supplicant.conf


network={
        ssid="demo1-devices"
        psk="cisco123"
}
  1. Reboot to make the changes take effect

sudo reboot

  1. After the reboot you can check whether it was successful with the following

ifconfig wlan0

If Wi-fi connectivity fails you may have a typo in your wpa-supplicant configuration. Double-check the values as they correspond to your Wi-Fi network and try again as you will need Internet connectivity to perform the rest of the installation.

Now that the Pi is connected to Wi-Fi it will be easier to continue the configuration via SSH. Make note of the IP address from the ifconfig command output above and connect there.


Update the Raspberry Pi

  1. Perform an initial update of the Pi, accepting any recommended packages
sudo apt update
sudo apt dist-upgrade


Set Up Users

  1. Create the picon account
sudo su -
adduser picon --disabled-password --quiet --gecos "Pi Console"
usermod -a -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,spi,i2c,gpio picon
passwd picon
Set a secure password and record it for future reference
  1. Exit the pi account console session and log in as the picon user with the credentials you just created
  2. Remove the default pi account

sudo deluser pi --remove-home --quiet


Back to Chapter 4 RWIS and Car Simulator

Back to Chapter 5 Serial DMS

left-chevronright-chevron